<template>
  <el-input-number
    v-model="val"
    :size="preferences.FormSize"
    v-bind="$attrs"
    v-on="$listeners"
    :precision="precision"
    :min="min"
  >
  </el-input-number>
</template>

<script>
export default {
  name: "MInputNumber",
  data() {
    return {
      val: null
    }
  },
  model: {
    prop: 'value'
  },
  components: {},
  props:{
    value: {
      type: [String, Number]
    },
    precision: {
      type: Number,
      default: 0
    },
    min: {
      type: Number,
      default: 0
    }
  },
  watch: {
    value:{
      handler: function (e){
        this.val = e
      },
      immediate: true,
    }
  },
  mounted() {
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>
@import "../../style/var.scss";
.el-input-number{
  min-width: px2(160);
}
</style>
